import React, { Component } from 'react'
import typeProps from 'prop-types'

class Child extends Component {

    static defaultProps = {
        name: '杨紫龙'
    }

    static propTypes = {
        name: typeProps.string.isRequired
    }

    render() { 
        let { name } = this.props
        return (
            <div>
                {name}
            </div>
        )
    }
}
 
export default Child;